<%@ page import="MySql.goodsManager" %>
<%@ page import="MySql.Goods" %>
<%@ page import="java.io.PrintWriter" %><%--
  Created by IntelliJ IDEA.
  User: 浅汐
  Date: 2020/11/27
  Time: 17:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <script>
        window.onload=function () {
            var modle=document.getElementsByClassName("m")[0];
            var title=document.getElementsByClassName("title")[0];
            var x,site;
            var length;
            x=modle.className.split(" ");
            length=x.length;
            site=x[length-1];
            // alert(x);
            <%!
                Goods good;
            %>
            <%
                good=goodsManager.getRowById("5");
             %>

      }
  </script>

    <%!
        boolean first=false;

    %>
    <%
        if (!first) {
            first = true;
            response.sendRedirect("showgoods.go");
        }
//        out.print(first);
    %>


</head>
<body>
    <%
//        response.sendRedirect("showgoods.go");
    %>
    <a href="showgoods1.go?item=1" >
        <div class="m 5" >
            <h1 class="title">${cookie.get("item-1-title").value}</h1>
            <h2 class="kind">${cookie.get("item-1-kind").value}</h2>
            <div class="brief">
                ${cookie.get("item-1-brief").value}
            </div>
            <h3 class="price">
                ${cookie.get("item-1-price").value}
            </h3>
        </div>
    </a>

    <a href="showgoods1.go?item=5" >
        <div class="m 5" >
            <h1 class="title">${cookie.get("item-5-title").value}</h1>
            <h2 class="kind">${cookie.get("item-5-kind").value}</h2>
            <div class="brief">
                ${cookie.get("item-5-brief").value}
            </div>
            <h3 class="price">
                ${cookie.get("item-5-price").value}
            </h3>
        </div>
    </a>
</body>
</html>
